feat: custom fetch impl via createStart#6417
Conversation
📝 WalkthroughWalkthroughThe PR introduces a global fetch configuration option for server functions in React Start. A new Changes
Sequence Diagram(s)sequenceDiagram
participant Client as Client Code
participant RPC as createClientRpc
participant Options as getStartOptions
participant Fetch as fetch()
rect rgba(100, 200, 150, 0.5)
Note over Client,Fetch: Fetch Selection Precedence
end
Client->>RPC: Call server function (optional callSite fetch)
RPC->>RPC: Check for callSite fetch override
alt callSite fetch provided
RPC->>Fetch: Use callSite fetch
else no callSite fetch
RPC->>Options: getStartOptions()
Options-->>RPC: Returns config with serverFns.fetch
alt middleware fetch interceptor exists
RPC->>Fetch: Use middleware fetch
else no middleware
alt serverFns.fetch configured
RPC->>Fetch: Use global serverFns.fetch
else no global fetch
RPC->>Fetch: Use native fetch
end
end
end
RPC->>Fetch: Execute with selected fetch
Fetch-->>RPC: Response
RPC-->>Client: Return result
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 markdownlint-cli2 (0.18.1)docs/start/framework/react/guide/middleware.mdmarkdownlint-cli2 v0.18.1 (markdownlint v0.38.0) Comment |
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx affected --targets=test:eslint,test:unit,tes... |
❌ Failed | 9m 6s | View ↗ |
nx run-many --target=build --exclude=examples/*... |
✅ Succeeded | 34s | View ↗ |
☁️ Nx Cloud last updated this comment at 2026-01-19 00:04:33 UTC

Summary by CodeRabbit
New Features
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.